package cn.sirun.com.fca.account.repo.register;


import com.tencent.cloud.iov.kernel.constant.HttpHeaderConst;
import com.tencent.cloud.iov.kernel.model.BaseResponse;

import cn.sirun.com.fca.account.model.base.CaptchaRequest;
import cn.sirun.com.fca.account.model.base.ResendResponse;
import cn.sirun.com.fca.account.model.base.SubmitPasswordRequest;
import cn.sirun.com.fca.account.model.base.SubmitPhoneRequest;
import cn.sirun.com.fca.account.model.base.SubmitPhoneResponse;
import cn.sirun.com.fca.account.model.login.LoginResponse;
import cn.sirun.com.fca.account.model.register.RegisterSubmitResponse;
import cn.sirun.com.fca.account.model.register.SubmitEmailRequest;
import io.reactivex.Observable;
import retrofit2.http.Body;
import retrofit2.http.Headers;
import retrofit2.http.POST;

public interface RegisterService {
    @Headers({HttpHeaderConst.CONTENT_TYPE_JSON})
    @POST("/v2/account/reg/submit_phone")
    Observable<BaseResponse<SubmitPhoneResponse>> submitPhone(@Body SubmitPhoneRequest request);

    @Headers({HttpHeaderConst.ADD_COOKIE, HttpHeaderConst.CONTENT_TYPE_JSON})
    @POST("/v2/account/reg/submit")
    Observable<BaseResponse<RegisterSubmitResponse>> submitCaptcha(@Body CaptchaRequest request);

    @Headers({HttpHeaderConst.ADD_COOKIE, HttpHeaderConst.CONTENT_TYPE_JSON})
    @POST("/v2/account/reg/resend")
    Observable<BaseResponse<ResendResponse>> resendCaptcha();

    @Headers({HttpHeaderConst.ADD_COOKIE, HttpHeaderConst.CONTENT_TYPE_JSON})
    @POST("/v2/account/reg/set_password")
    Observable<BaseResponse<LoginResponse>> setPassword(@Body SubmitPasswordRequest request);

    @Headers({HttpHeaderConst.CONTENT_TYPE_JSON})
    @POST("/v2/account/emailreg/submit_email")
    Observable<BaseResponse<SubmitPhoneResponse>> submitEmail(@Body SubmitEmailRequest request);

    @Headers({HttpHeaderConst.CONTENT_TYPE_JSON, HttpHeaderConst.ADD_COOKIE})
    @POST("/v2/account/emailreg/submit")
    Observable<BaseResponse<RegisterSubmitResponse>> submitEmailCaptcha(@Body CaptchaRequest request);

    @Headers({HttpHeaderConst.ADD_COOKIE, HttpHeaderConst.CONTENT_TYPE_JSON})
    @POST("/v2/account/emailreg/resend")
    Observable<BaseResponse<ResendResponse>> resend();

    @Headers({HttpHeaderConst.ADD_COOKIE, HttpHeaderConst.CONTENT_TYPE_JSON})
    @POST("/v2/account/emailreg/set_password")
    Observable<BaseResponse<LoginResponse>> setEmailPassword(@Body SubmitPasswordRequest request);


}
